import javax.swing.JComponent;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;

public class ThreeButtonComponent extends JComponent
{
   public void paintComponent(Graphics g)
   {
      Graphics2D g2 = (Graphics2D) g;
      // your work here
      g2.setColor(Color.GRAY);
      g2.fill3DRect(50,50,50,50,true);
      g2.fill3DRect(110,50,50,50,true);
      g2.fill3DRect(170,50,50,50,true);
      g2.setColor(Color.RED);
      g2.fillOval(60,60,30,30);
      g2.setColor(Color.GREEN);
      g2.fillOval(120,60,30,30);
      g2.setColor(Color.CYAN);
      g2.fillOval(180,60,30,30);
   }
}